interface IUSer {
    userName: string;
    password: string;
    phone: number;
    login: () => void;
  }
  
  // 类装饰器
  function TestClass2(target: any, discriptor: any) {
    console.time("timerName")
    new target();
    console.timeEnd("timerName");
  }
  @TestClass2
  class User1 implements IUSer {
    userName;
    password;
    phone;
    constructor(userName: string, password: string, phone: number) {
      console.log("执行");
  
      this.userName = userName;
      this.password = password;
      this.phone = phone;
    }
    login() {
      console.log("我成功登录了", this.userName);
    }
  }
  